' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2024.09.09.00.00]) on 2025.08.10 at 20:49 (Coordinated Universal Time)
' This program by Charlie Veniot is a port and mod of a program
' shared by Ardi Ardi with the "BASIC Programming Language"
' Facebook group (https://www.facebook.com/share/p/16AVaqvgWE/)
CONST sw = 550, _
sh = 350
DIM g( 1 TO 3, 1 TO 3 )
SCREEN _NEWIMAGE( sw, sh, 17 )
FOR j = 1 TO 3
FOR i = 1 TO 3
READ g( i, j )
NEXT i
NEXT j
🔶draw_iteration:
this_color1 = INT( RND * 64 )
this_color2 = this_color1
WHILE this_color2 = this_color1 : this_color2 = INT( RND * 64 ) : WEND
FOR y = 0 TO sh
FOR x = 0 TO sw
LET i = 2 * ( x / 255 )
LET j = 2 * ( y / 175 ) - 1
LET r = SQR( i * i + j * j )
LET v = ABS( 0.5 * [ SIN( 9 * i * r ) + COS( 6 * j * r ) ] )
LET c = INT( 9.9999 * v )
COLOR IFF( g( 1 + x - 3 * INT( x / 3 ), 1 + y - 3 * INT( y / 3 ) ) <= c, _
this_color1, _
this_color2 )
PLOT( x, y )
NEXT x
SLEEP 0.01
NEXT y
SLEEP 3
GOTO 🔶draw_iteration
END
DATA 4,9,6,5,1,2,8,3,7